.class public Lcom/estrongs/android/taskmanager/HomePreferencesActivity;
.super Landroid/preference/PreferenceActivity;


# static fields
.field public static a:Ljava/lang/String;


# instance fields
.field b:Landroid/preference/CheckBoxPreference;

.field c:Landroid/preference/CheckBoxPreference;

.field d:Landroid/preference/ListPreference;

.field e:Landroid/preference/Preference;

.field f:Landroid/preference/Preference;

.field g:Landroid/preference/Preference;

.field private h:Ljava/lang/String;

.field private i:Ljava/lang/String;

.field private final j:I


# direct methods
.method static constructor <clinit>()V
    .locals 1

    const-string v0, "goapk.com"

    sput-object v0, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->a:Ljava/lang/String;

    return-void
.end method

.method public constructor <init>()V
    .locals 1

    invoke-direct {p0}, Landroid/preference/PreferenceActivity;-><init>()V

    const-string v0, "com.estrongs.android.taskmanager"

    iput-object v0, p0, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->h:Ljava/lang/String;

    const-string v0, "\"EStrongs Inc.\""

    iput-object v0, p0, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->i:Ljava/lang/String;

    const/4 v0, 0x2

    iput v0, p0, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->j:I

    return-void
.end method

.method static synthetic a(Lcom/estrongs/android/taskmanager/HomePreferencesActivity;)Ljava/lang/String;
    .locals 1

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->h:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic a(Lcom/estrongs/android/taskmanager/HomePreferencesActivity;Ljava/lang/String;Ljava/lang/String;)V
    .locals 0

    invoke-direct {p0, p1, p2}, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->a(Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method

.method private a(Ljava/lang/String;Ljava/lang/String;)V
    .locals 3

    new-instance v0, Landroid/content/Intent;

    const-string v1, "android.intent.action.VIEW"

    invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "market://search?q="

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ":"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;

    :try_start_0
    invoke-super {p0, v0}, Landroid/preference/PreferenceActivity;->startActivity(Landroid/content/Intent;)V
    :try_end_0
    .catch Landroid/content/ActivityNotFoundException; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    return-void

    :catch_0
    move-exception v0

    invoke-virtual {p0}, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->a()V

    goto :goto_0
.end method

.method private b()Ljava/lang/String;
    .locals 4

    const/4 v0, 0x0

    :try_start_0
    invoke-virtual {p0}, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v1

    invoke-virtual {p0}, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->getPackageName()Ljava/lang/String;

    move-result-object v2

    const/16 v3, 0x2000

    invoke-virtual {v1, v2, v3}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;
    :try_end_0
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v1

    :goto_0
    if-eqz v1, :cond_0

    iget-object v0, v1, Landroid/content/pm/PackageInfo;->versionName:Ljava/lang/String;

    :cond_0
    return-object v0

    :catch_0
    move-exception v1

    move-object v1, v0

    goto :goto_0
.end method

.method static synthetic b(Lcom/estrongs/android/taskmanager/HomePreferencesActivity;)Ljava/lang/String;
    .locals 1

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->i:Ljava/lang/String;

    return-object v0
.end method


# virtual methods
.method public a()V
    .locals 3

    const-string v0, "http://www.estrongs.com/download.html"

    invoke-static {v0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v0

    new-instance v1, Landroid/content/Intent;

    const-string v2, "android.intent.action.VIEW"

    invoke-direct {v1, v2, v0}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V

    invoke-virtual {p0, v1}, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->startActivity(Landroid/content/Intent;)V

    return-void
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 3

    invoke-super {p0, p1}, Landroid/preference/PreferenceActivity;->onCreate(Landroid/os/Bundle;)V

    const v0, 0x7f050001

    invoke-virtual {p0, v0}, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->addPreferencesFromResource(I)V

    const-string v0, "auto_kill"

    invoke-virtual {p0, v0}, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    check-cast v0, Landroid/preference/CheckBoxPreference;

    iput-object v0, p0, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->b:Landroid/preference/CheckBoxPreference;

    const-string v0, "style"

    invoke-virtual {p0, v0}, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    check-cast v0, Landroid/preference/ListPreference;

    iput-object v0, p0, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->d:Landroid/preference/ListPreference;

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->d:Landroid/preference/ListPreference;

    new-instance v1, Lcom/estrongs/android/taskmanager/cb;

    invoke-direct {v1, p0}, Lcom/estrongs/android/taskmanager/cb;-><init>(Lcom/estrongs/android/taskmanager/HomePreferencesActivity;)V

    invoke-virtual {v0, v1}, Landroid/preference/ListPreference;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->b:Landroid/preference/CheckBoxPreference;

    invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-virtual {p0}, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->getBaseContext()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Lcom/estrongs/android/taskmanager/widget/TmWidgetProvider;->d(Landroid/content/Context;)Ljava/util/ArrayList;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-nez v0, :cond_0

    new-instance v0, Landroid/app/AlertDialog$Builder;

    invoke-direct {v0, p0}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    const v1, 0x7f070032

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setTitle(I)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    const v1, 0x7f070033

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setMessage(I)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    const v1, 0x104000a

    new-instance v2, Lcom/estrongs/android/taskmanager/cd;

    invoke-direct {v2, p0}, Lcom/estrongs/android/taskmanager/cd;-><init>(Lcom/estrongs/android/taskmanager/HomePreferencesActivity;)V

    invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    invoke-virtual {v0}, Landroid/app/AlertDialog$Builder;->show()Landroid/app/AlertDialog;

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->b:Landroid/preference/CheckBoxPreference;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V

    :cond_0
    iget-object v0, p0, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->b:Landroid/preference/CheckBoxPreference;

    new-instance v1, Lcom/estrongs/android/taskmanager/ce;

    invoke-direct {v1, p0}, Lcom/estrongs/android/taskmanager/ce;-><init>(Lcom/estrongs/android/taskmanager/HomePreferencesActivity;)V

    invoke-virtual {v0, v1}, Landroid/preference/CheckBoxPreference;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V

    const-string v0, "faq"

    invoke-virtual {p0, v0}, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    iput-object v0, p0, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->e:Landroid/preference/Preference;

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->e:Landroid/preference/Preference;

    new-instance v1, Lcom/estrongs/android/taskmanager/cg;

    invoke-direct {v1, p0}, Lcom/estrongs/android/taskmanager/cg;-><init>(Lcom/estrongs/android/taskmanager/HomePreferencesActivity;)V

    invoke-virtual {v0, v1}, Landroid/preference/Preference;->setOnPreferenceClickListener(Landroid/preference/Preference$OnPreferenceClickListener;)V

    const-string v0, "about"

    invoke-virtual {p0, v0}, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    iput-object v0, p0, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->g:Landroid/preference/Preference;

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->g:Landroid/preference/Preference;

    new-instance v1, Lcom/estrongs/android/taskmanager/ch;

    invoke-direct {v1, p0}, Lcom/estrongs/android/taskmanager/ch;-><init>(Lcom/estrongs/android/taskmanager/HomePreferencesActivity;)V

    invoke-virtual {v0, v1}, Landroid/preference/Preference;->setOnPreferenceClickListener(Landroid/preference/Preference$OnPreferenceClickListener;)V

    sget-object v0, Lcom/estrongs/android/taskmanager/TaskManager;->c:Ljava/lang/String;

    const-string v1, "Malata"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_1

    const-string v0, "root_enhanced"

    invoke-virtual {p0, v0}, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    check-cast v0, Landroid/preference/CheckBoxPreference;

    iput-object v0, p0, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->c:Landroid/preference/CheckBoxPreference;

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->c:Landroid/preference/CheckBoxPreference;

    new-instance v1, Lcom/estrongs/android/taskmanager/ci;

    invoke-direct {v1, p0}, Lcom/estrongs/android/taskmanager/ci;-><init>(Lcom/estrongs/android/taskmanager/HomePreferencesActivity;)V

    invoke-virtual {v0, v1}, Landroid/preference/CheckBoxPreference;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V

    :cond_1
    const-string v0, "upgrade_check"

    invoke-virtual {p0, v0}, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    iput-object v0, p0, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->f:Landroid/preference/Preference;

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->f:Landroid/preference/Preference;

    new-instance v1, Lcom/estrongs/android/taskmanager/cj;

    invoke-direct {v1, p0}, Lcom/estrongs/android/taskmanager/cj;-><init>(Lcom/estrongs/android/taskmanager/HomePreferencesActivity;)V

    invoke-virtual {v0, v1}, Landroid/preference/Preference;->setOnPreferenceClickListener(Landroid/preference/Preference$OnPreferenceClickListener;)V

    return-void
.end method

.method protected onCreateDialog(I)Landroid/app/Dialog;
    .locals 5

    const/4 v1, 0x0

    packed-switch p1, :pswitch_data_0

    move-object v0, v1

    :goto_0
    return-object v0

    :pswitch_0
    const-string v0, "layout_inflater"

    invoke-virtual {p0, v0}, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/view/LayoutInflater;

    const/high16 v2, 0x7f03

    invoke-virtual {v0, v2, v1}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v2

    const v0, 0x7f090002

    invoke-virtual {v2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    new-instance v1, Lcom/estrongs/android/taskmanager/ck;

    invoke-direct {v1, p0}, Lcom/estrongs/android/taskmanager/ck;-><init>(Lcom/estrongs/android/taskmanager/HomePreferencesActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    const v0, 0x7f090001

    invoke-virtual {v2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    sget-object v1, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->a:Ljava/lang/String;

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    const/high16 v0, 0x7f09

    invoke-virtual {v2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    invoke-direct {p0}, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->b()Ljava/lang/String;

    move-result-object v1

    if-nez v1, :cond_0

    const-string v1, "1.x"

    :cond_0
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const v4, 0x7f0700ef

    invoke-virtual {p0, v4}, Lcom/estrongs/android/taskmanager/HomePreferencesActivity;->getText(I)Ljava/lang/CharSequence;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, " "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v3, " ("

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    sget-object v3, Lcom/estrongs/android/taskmanager/TaskManager;->c:Ljava/lang/String;

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v3, ")"

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    new-instance v0, Landroid/app/AlertDialog$Builder;

    invoke-direct {v0, p0}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    const v1, 0x108009b

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setIcon(I)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    const/high16 v1, 0x7f07

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setTitle(I)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    invoke-virtual {v0, v2}, Landroid/app/AlertDialog$Builder;->setView(Landroid/view/View;)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    const v1, 0x7f0700f4

    new-instance v2, Lcom/estrongs/android/taskmanager/cl;

    invoke-direct {v2, p0}, Lcom/estrongs/android/taskmanager/cl;-><init>(Lcom/estrongs/android/taskmanager/HomePreferencesActivity;)V

    invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    const v1, 0x7f0700f5

    new-instance v2, Lcom/estrongs/android/taskmanager/cc;

    invoke-direct {v2, p0}, Lcom/estrongs/android/taskmanager/cc;-><init>(Lcom/estrongs/android/taskmanager/HomePreferencesActivity;)V

    invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setNegativeButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    invoke-virtual {v0}, Landroid/app/AlertDialog$Builder;->create()Landroid/app/AlertDialog;

    move-result-object v0

    goto/16 :goto_0

    :pswitch_data_0
    .packed-switch 0x2
        :pswitch_0
    .end packed-switch
.end method
